#!/usr/bin/python

import fourchan, ponychan

parsers = {'4chan.org':fourchan.FourChanParse,'ponychan.net':ponychan.PonyChanParse}

def main(argv):
    if len(argv) != 3:
        print __usage__
        return
    parser = parsers[argv[0]]()
    parser.board = argv[1]
    parser.thread = argv[2]
    if parser.sync():
        parser.download()
    else:
        print parser.error

if __name__ == '__main__':
    import sys
    main(sys.argv[1:])
    
